package org.shiwen.week5.answer;

import java.util.Scanner;

public class Q3 {
    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        System.out.println("请输入一个整数");
        int n = sc.nextInt();
        int temp = n;
        int reverse = 0 ;
        while(temp>0){
            reverse = reverse * 10 + temp%10;
            temp = temp/10;
        }
        if(n==reverse){
            System.out.println("是回文数");
        }else {
            System.out.println("不是回文数");
        }
    }
}
